package com.spic.business.plan.drill.service.impl;

import java.util.List;
import com.spic.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spic.business.plan.drill.mapper.PlanDrillPerformStepMapper;
import com.spic.business.plan.drill.domain.PlanDrillPerformStep;
import com.spic.business.plan.drill.service.IPlanDrillPerformStepService;

/**
 * 应急预案演练实施步骤Service业务层处理
 * 
 * @author renxiang
 * @date 2021-10-31
 */
@Service
public class PlanDrillPerformStepServiceImpl implements IPlanDrillPerformStepService 
{
    @Autowired
    private PlanDrillPerformStepMapper planDrillPerformStepMapper;

    /**
     * 查询应急预案演练实施步骤
     * 
     * @param id 应急预案演练实施步骤主键
     * @return 应急预案演练实施步骤
     */
    @Override
    public PlanDrillPerformStep selectPlanDrillPerformStepById(Long id)
    {
        return planDrillPerformStepMapper.selectPlanDrillPerformStepById(id);
    }

    /**
     * 查询应急预案演练实施步骤列表
     * 
     * @param planDrillPerformStep 应急预案演练实施步骤
     * @return 应急预案演练实施步骤
     */
    @Override
    public List<PlanDrillPerformStep> selectPlanDrillPerformStepList(PlanDrillPerformStep planDrillPerformStep)
    {
        return planDrillPerformStepMapper.selectPlanDrillPerformStepList(planDrillPerformStep);
    }

    /**
     * 新增应急预案演练实施步骤
     * 
     * @param planDrillPerformStep 应急预案演练实施步骤
     * @return 结果
     */
    @Override
    public int insertPlanDrillPerformStep(PlanDrillPerformStep planDrillPerformStep)
    {
        planDrillPerformStep.setCreateTime(DateUtils.getNowDate());
        return planDrillPerformStepMapper.insertPlanDrillPerformStep(planDrillPerformStep);
    }

    /**
     * 修改应急预案演练实施步骤
     * 
     * @param planDrillPerformStep 应急预案演练实施步骤
     * @return 结果
     */
    @Override
    public int updatePlanDrillPerformStep(PlanDrillPerformStep planDrillPerformStep)
    {
        planDrillPerformStep.setUpdateTime(DateUtils.getNowDate());
        return planDrillPerformStepMapper.updatePlanDrillPerformStep(planDrillPerformStep);
    }

    /**
     * 批量删除应急预案演练实施步骤
     * 
     * @param ids 需要删除的应急预案演练实施步骤主键
     * @return 结果
     */
    @Override
    public int deletePlanDrillPerformStepByIds(Long[] ids)
    {
        return planDrillPerformStepMapper.deletePlanDrillPerformStepByIds(ids);
    }

    /**
     * 删除应急预案演练实施步骤信息
     * 
     * @param id 应急预案演练实施步骤主键
     * @return 结果
     */
    @Override
    public int deletePlanDrillPerformStepById(Long id)
    {
        return planDrillPerformStepMapper.deletePlanDrillPerformStepById(id);
    }
}
